<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>登录</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="icon" href="../static/logo/logo.png">
	<link rel="stylesheet" href="../static/lib/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="../static/css/admin.css" media="all">

	<style>
		canvas {
			position: absolute;
			z-index: -1;
		}

		.kit-login-box header h1 {
			line-height: normal;
		}

		.kit-login-box header {
			height: auto;
		}

		.content {
			position: relative;
		}

		.codrops-demos a {
			border: 2px solid rgba(242, 242, 242, 0.41);
			color: rgba(255, 255, 255, 0.51);
		}

		.kit-pull-right button,
		.kit-login-main .layui-form-item input {
			background-color: transparent;
			color: white;
		}

		.kit-login-main .layui-form-item input::-webkit-input-placeholder {
			color: white;
		}

		.kit-login-main .layui-form-item input:-moz-placeholder {
			color: white;
		}

		.kit-login-main .layui-form-item input::-moz-placeholder {
			color: white;
		}

		.kit-login-main .layui-form-item input:-ms-input-placeholder {
			color: white;
		}

		.kit-pull-right button:hover {
			border-color: #009688;
			color: #009688
		}
	</style>
	<script>
        var error = ${error};
	</script>

</head>

<body>
	<div class="tmm-login tmm-user-display-show" id="tmm-login">
		<div class="layui-row">
<%--			<div class="layui-col-md4 tmm-auth-left">--%>
<%--				<a lay-href="../../static/index.html" class="logo">--%>
<%--					<img src="../static/img/logo.png">--%>
<%--				</a>--%>
<%--			</div>--%>
			<div class="layui-col-md6 tmm-auth-right">
				<div class="tmm-login-container">
					<div class="tmm-login-header">
						<h2>
							欢迎登录
							<a href="">立即注册</a>
						</h2>
					</div>
					<form id="form" action="${path}/login" method="post">
						<div class="tmm-login-box tmm-login-body layui-form">
							<div class="layui-form-item">
								<input type="text" name="username" id="tmm-login-username" placeholder="请输入用户名"
									class="layui-input">
							</div>
							<div class="layui-form-item">
								<input type="password" name="password" id="tmm-login-password"
									placeholder="请输入密码" class="layui-input">
							</div>
							<%--<div class="layui-form-item">--%>
									<%--<a href="" class="forget">忘记密码</a>--%>
								<%--</div>--%>
							<div class="layui-form-item" style="margin-top: 60px;">
								<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="tmm-login-submit">登录</button>
							</div>
						</div>
					</form>
				</div>

			</div>
		</div>
	</div>

	<script src="../static/lib/layui/layui.js"></script>
	<script>
		layui.config({
			base: '../../static/js/'
		}).extend({
			index: 'index'
		}).use(['index', 'form'], function () {
			var $ = layui.$
				, setter = layui.setter
				, admin = layui.admin
				, form = layui.form
				, router = layui.router()
				, search = router.search;

			form.render();

            var layer = layui.layer,
                $ = layui.jquery;

            // 错误消息提示
            if(error.code > 0){
                layer.msg(error.msg);
                $("#username").focus();
            }

            // 加载...
            var index = layer.load(2, {
                shade: [0.3, '#333']
            });

            // 加载完毕
            $(window).on('load', function() {
                layer.close(index);
            }());

		});
	</script>
</body>

</html>